#include "udpServer.hpp"
using namespace Server;
#include <memory>
static void Uasge()
{
    cout<<"Usage\n\t"<<"local_port error"<<endl;
}

static void handlemessage(string,uint16_t,string)
{
    cout<<"handlemessage"<<endl;
}

int main(int argc, char* argv[])
{
    if(argc!=2)
    {
        Uasge();
        exit(USAGE_ERROR);
    }
    uint16_t serverport = atoi(argv[1]);
    unique_ptr<udpserver> se_ptr(new udpserver(handlemessage,serverport));
    se_ptr->initServer();
    se_ptr->startServer();
    return 0;
}